package com.example.dao;


import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class Dao {
	private static Context context;
	private static DataSource datasource;
	private static SQLiteDatabase bd;
	private static String DATA_NAME="demoplanete"; 
	private static int VERSION=1;
	public Dao() {
		
	}

	public void openWriteable (){
		datasource = new DataSource(context);
		 bd=datasource.getWritableDatabase();
		 return ;
		}
	public void open(){
		 bd=datasource.getWritableDatabase();
		 
		}
	
	public static SQLiteDatabase getBd() {
		return bd;
	}

	public static void setBd(SQLiteDatabase bd) {
		Dao.bd = bd;
	}

	public  void close(){
		bd.close();
		datasource.close();
		
	}

}
